"""
@name : 循环结构-for
@author : wenyao
@projectname: xsfh
"""
#for  变量名 in  可迭代对象:
#      循环体

# for i in range(10):
#     print(i)

# a = "abcEdfGH"  #-->00010011  #如果为大写对应的位置就输出1 否则就输出0
# for i in a:
#     print(i)

# str1 = input("请输入字符串:")
# # for i in str1:
# #     print("1",end="") if i.isupper() else print("0", end="")
# result = ""
# for i in str1:
#     result += "1" if i.isupper() else "0"
# print(result)

# username = input("please input your name:")
# if username == "root":
#     for i in range(3):
#         passwd = input("please input your password:")
#         if passwd == "123456":
#             print("登录成功！")
#             break
#         else:
#             print(f"登录失败,还剩{3-i-1}次机会")
# else:
#     print("请输入正确的用户名")

for i in range(3):
    if i ==1:
        break
    print(i)
else:       #else  for循环全部运行完 正常退出时 执行else里的内容
    print("this is else")
